home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
EuroCD 3
/
EuroCD 3.iso
/
Programming
/
Amos
/
AMOSList-0497
/
AMOSLIST
/
000167_amos-request@svcs1.digex.net_Sun Apr 20 11:28:08 1997.msg
< prev
next >
Wrap
Text File
|
1998-06-24
|
4KB
|
81 lines
Received: from svcs1.digex.net (svcs1.digex.net [204.91.197.224])
by mail1.access.digex.net (8.8.5/8.8.5) with ESMTP id LAA23742
for <mcox@access.digex.net>; Sun, 20 Apr 1997 11:28:07 -0400 (EDT)
Received: (from daemon@localhost)
by svcs1.digex.net (8.8.5/8.8.5) id KAA05428
for amos-out; Sun, 20 Apr 1997 10:14:49 -0400 (EDT)
Received: from mail1.access.digex.net (mail1.access.digex.net [205.197.247.2])
by svcs1.digex.net (8.8.5/8.8.5) with ESMTP id KAA05425
for <amos-list@svcs1.digex.net>; Sun, 20 Apr 1997 10:14:48 -0400 (EDT)
Received: from kruuna.Helsinki.FI (palaste@kruuna.helsinki.fi [128.214.180.131])
by mail1.access.digex.net (8.8.5/8.8.5) with ESMTP id KAA12740
for <amos-list@access.digex.net>; Sun, 20 Apr 1997 10:14:46 -0400 (EDT)
Received: from localhost (palaste@localhost) by kruuna.Helsinki.FI (8.8.5/8.8.0) with SMTP id RAA27187; Sun, 20 Apr 1997 17:14:41 +0300 (EET DST)
X-Authentication-Warning: kruuna.Helsinki.FI: palaste owned process doing -bs
Date: Sun, 20 Apr 1997 17:14:40 +0300 (EET DST)
From: Joona I Palaste <palaste@cc.helsinki.fi>
X-Sender: palaste@kruuna.Helsinki.FI
To: Stephen W Williams <stevewil@stevewil.demon.co.uk>
cc: amos-list@access.digex.net
Subject: Re: Printing to file
In-Reply-To: <1597.7049T592T551@stevewil.demon.co.uk>
Message-ID: <Pine.SOL.3.96.970420171245.26536C-100000@kruuna.Helsinki.FI>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Status: RO
X-Status:
On 20 Apr 1997, Stephen W Williams wrote:
> To All
> Can someone help me with a small but irritating problem I am having
> with a little prog I am trying to get working.
> What I want to do is use AmosPro to create a file in Ram called Datapath
> and then execute it with Amiga dos.
> If you look at the example below it should create a file called Datapath
> containing "CD workbench:data".
> Now the hard part, the file should change the current directory to
> workbench:data (which does exist on my system).
> But What I get is "object not found CD failed returncode 20",
> I think I have found why it doesn't run because there seems to be extra
> characters at the end of the file, I.e. the example below should create a file
> 18 characters long including Return
> But the actual file is 20 long and its these extra characters that cause the
> problem, If I load the file into a Text Editor and delete the invisible
> characters at the end and resave the file it runs fine.
> So the Question how do I create a file without the extra characters?
> I have tryed CHR$(13)/CHR$(10) After A$ but no luck.
> And I can remove any extra characters easily inside Amos.
>
> a$="workbench:data"
> C$="CD "
> A$=C$+A$
> Open Out 3,"Ram:Datapath"
> Print #3,A$
> Print #3,Chr$(13)
> Close 3
>
> Any help would be appreciated
> Thanks Steve.
> end
The way I see it the fault MUST lie in the EOL chars. AMOS writes CRLF
EOLs, whereas AmigaDOS expects LF EOLS. So you might want to do the
writing this way:
Open Out 3,"ram:datapath"
Print#3,A$;Chr$(10);
Close 3
Remember to ALWAYS use a semicolon (;) in Print# commands if you want
to write AmigaDOS readable files!
/----------------------------------------------------------------------\
| Joona Palaste | | | |
| palaste@cc.helsinki.fi | | | |
| G++ FR FW+ M- #20 D+ ADA N+++ W++ B OP+ |------- -----------------|
| |------- -----------------|
| | | | |
| Finland rules! => | | | |
\----------------------------------------------------------------------/